package nc.ui.lm.lscgya;

import java.awt.Container;
import java.io.Serializable;

import nc.ui.trade.check.BeforeActionCHK;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.trade.checkrule.VOChecker;

public class ClientUICHK extends BeforeActionCHK implements Serializable {
	
	private static final long serialVersionUID = 1L;

	public void runBatchClass(Container parent, String billType,
			String actionName, AggregatedValueObject[] vos, Object[] obj)
			throws Exception {

	}

	public void runClass(Container parent, String billType, String actionName,
			AggregatedValueObject vo, Object obj) throws Exception {
		if (actionName.equals(nc.ui.trade.businessaction.IPFACTION.SAVE)) {
			if (!VOChecker.check(vo, ClientUICheckRule.getInstance()))
				throw new nc.vo.pub.BusinessException(VOChecker
						.getErrorMessage());
		}
	}

}
